package assets_withdraw

import (
	"context"

	"gitee.com/liuxuezhan/ar-platform/admin-api/internal/svc"
	"gitee.com/liuxuezhan/ar-platform/admin-api/internal/types"
	"gitee.com/liuxuezhan/ar-platform/rpc-client/assetsClient/rpc"
	"github.com/zeromicro/go-zero/core/logx"
)

type WithdrawEnumLogic struct {
	logx.Logger
	ctx    context.Context
	svcCtx *svc.ServiceContext
}

// 资产模块 - 枚举
func NewWithdrawEnumLogic(ctx context.Context, svcCtx *svc.ServiceContext) *WithdrawEnumLogic {
	return &WithdrawEnumLogic{
		Logger: logx.WithContext(ctx),
		ctx:    ctx,
		svcCtx: svcCtx,
	}
}

func (l *WithdrawEnumLogic) WithdrawEnum(req *types.WithdrawEnumReq) (resp *types.WithdrawEnumRes, err error) {
	// todo: add your logic here and delete this line
	resp = &types.WithdrawEnumRes{}
	resp.Channel_type = append(resp.Channel_type, types.WithdrawEnumItem{
		int32(rpc.ChannelType_ChannelTypeBank), "BANK CODE"})
	resp.Channel_type = append(resp.Channel_type, types.WithdrawEnumItem{
		int32(rpc.ChannelType_ChannelTypeEwallet), "E-Wallet"})
	resp.Channel_type = append(resp.Channel_type, types.WithdrawEnumItem{
		int32(rpc.ChannelType_ChannelTypeLocalEwallet), "Local-E-Wallet"})
	resp.Channel_type = append(resp.Channel_type, types.WithdrawEnumItem{
		int32(rpc.ChannelType_ChannelTypePixWallets), "PIX"})
	resp.Channel_type = append(resp.Channel_type, types.WithdrawEnumItem{
		int32(rpc.ChannelType_ChannelTypeUsdtWallets), "USDT"})
	resp.Channel_type = append(resp.Channel_type, types.WithdrawEnumItem{
		int32(rpc.ChannelType_ChannelTypeSuccess), "Success"})

	resp.Withdraw_status = append(resp.Withdraw_status, types.WithdrawEnumItem{
		int32(rpc.WithDrawStatus_UnLock), "unlock"})
	resp.Withdraw_status = append(resp.Withdraw_status, types.WithdrawEnumItem{
		int32(rpc.WithDrawStatus_Lock), "lock"})
	resp.Withdraw_status = append(resp.Withdraw_status, types.WithdrawEnumItem{
		int32(rpc.WithDrawStatus_Pass), "pass"})
	resp.Withdraw_status = append(resp.Withdraw_status, types.WithdrawEnumItem{
		int32(rpc.WithDrawStatus_Refuse), "refuse"})
	resp.Withdraw_status = append(resp.Withdraw_status, types.WithdrawEnumItem{
		int32(rpc.WithDrawStatus_Success), "success"})
	resp.Withdraw_status = append(resp.Withdraw_status, types.WithdrawEnumItem{
		int32(rpc.WithDrawStatus_Fail), "fail"})

	resp.Open_status = append(resp.Open_status, types.WithdrawEnumItem{
		int32(rpc.IsOpen_IsOpenOn), "open"})
	resp.Open_status = append(resp.Open_status, types.WithdrawEnumItem{
		int32(rpc.IsOpen_IsOpenOff), "close"})
	return resp, nil

}
